package RKUjava.datastructures;
import java.util.Enumeration;

/** The RKUEnumeration is a "no-function" implmementation of the Enumeration 
    class. It allows passing of 0, 1 or 2 containerobjects. (Usually the object
    it enumerates and perhaps some other object.)
*/
public class RKUEnumeration implements Enumeration
{
  public RKUEnumeration()
    {
      super();
      initialize(null, null);
    }

  public RKUEnumeration(Object acontainer1)
    {
      super();
      initialize(acontainer1, null);
    }

  public RKUEnumeration(Object acontainer1, Object acontainer2)
    {
      super();
      initialize(acontainer1, acontainer2);
    }

  /** Called from the constructor to allow initialization in anonymous 
      classes. */
  public void initialize(Object acontainer1, Object acontainer2)
    {
    }

  /** The nextElement method from the Enumeration interface. Override in 
      subclass.
  */
  public Object nextElement()
    {
      return null;
    }

  /** The hasMoreElements method from the Enumeration interface. Override in 
      subclass.
  */
  public boolean hasMoreElements()
    {
      return false;
    }
}
